/**
@author		Jong Min, Lee
@date		  01/21/2014
@breif		system environments

copyright(c) Tae Young Soft. All right reserved. 2014
*/
#pragma once

#include "Taurus_Util/Macros.h"
#include "Taurus_Common/TCDefine.h"

/**
@brief		class that represents system environment
*/
class TAURUS_COMMON_EXPORT CSystemEnvironment
{
private:
  /**
  @brief		default constructor
  */
  CSystemEnvironment();

  DISALLOW_COPY_AND_ASSIGN(CSystemEnvironment);

public:
  /**
  @brief		default constructor
  */
  ~CSystemEnvironment();

  /**
  @brief		get the single instance of system environment
  @return		pointer to the single instance of system environment
  */
  static CSystemEnvironment* getInstance();

  /**
  @brief		create environment
  */
  void createEnvionment();

  /**
  @brief    get program root path		
  @return	  program root path
  */
  const TCHAR* getAppRootPath() const;

  /**
  @brief		get property path
  @return		property path
  */
  const TCHAR* getPropertyPath() const;

  /**
  @brief		get study list path
  @return		study list path
  */
  const TCHAR* getStudyListPath() const;

  /**
  @brief		get logger configuration path
  */
  const TCHAR* getLoggerCfgPath() const;

private:
  /**
  @brief		make property path based on app root path
  */
  CString makePropertyPath(const TCHAR* pszRootPath) const;

  /**
  @brief		make study list path based on app root path
  */
  CString makeStudyListPath(const TCHAR* pszRootPath) const;

  /**
  @brief		make logger config path base on app root path
  */
  CString makeLoggerCfgPath(const TCHAR* pszRootPath) const;

private:

  //pointer to the single instance of system environment
  static CSystemEnvironment* m_pInstance;

  //program root path
  CString m_strAppRootPath;

  //property path
  CString m_strPropertyPath;

  //study list path
  CString m_strStudyPath;

  //logger config path
  CString m_strLoggerCfgPath;
};

